package com.yihu.cms.service;

import java.io.IOException;
import java.net.MalformedURLException;
import java.util.ArrayList;
import java.util.List;

import com.yihu.beans.DerivativesCategory;
import com.yihu.dataService.hessian.mongodb.interfaceService.DerivativesCategoryHService;
import com.yihu.dataService.hessian.resource.ResourceMongoDBManager;

public class DerivativesCategoryService {
	
	public List<DerivativesCategory> getAll() {
		List<DerivativesCategory> result = new ArrayList<DerivativesCategory>();
		try {
			DerivativesCategoryHService dc = (DerivativesCategoryHService) ResourceMongoDBManager
					.getSingleton().getBeans("derivativesCategoryHSC");

			result = dc.getAllDerivativesCategory();
		} catch (MalformedURLException e) {
			System.out.println(e.toString());
		} catch (IOException e1) {
			e1.printStackTrace();
		}
		
		return result;
	}

	public static void main(String[] args) {
		// TODO Auto-generated method stub

	}

}
